package com.srp.servise;

import com.baomidou.mybatisplus.extension.service.IService;
import com.srp.common.R;
import com.srp.dto.DataFileDto;
import com.srp.dto.TreeDto;
import com.srp.pojo.DataFile;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;
import java.util.Map;

public interface TreeService extends IService<DataFile> {
    //可能的问题，不同用户提交的同名数据集name无法区分
    Boolean generateTree(String id,String code, String name,String userId) throws IOException, InterruptedException;
    Boolean deleteTree(List<String> treeNames,String userId) throws IOException, InterruptedException;
    String getTreeDetail(String id,String userId);

    R<Object> statisticAnalysis(String treeName, int dataId);

    List<TreeDto> getTreeList(String userId);
    List<String> getRight(String user_id);

    void giveUserFileRight(String user_id, int file_id);

    void deleteRowsByFileId(String file_id);

    R<Boolean> uploadTestData(MultipartFile file);

    R<String> getFeedback(String treeId, int dataId, HttpServletResponse response);

    R<Boolean> deleteTestData(List<String> ids);

    R<List<DataFileDto>> getTestDataList();

    R<String> downloadTestData(String id,HttpServletResponse response) throws IOException;

    R<List<DataFileDto>> getDataList(String userId);

    R<Map<String, List<String>>> getAttributes(String treeId);

    R<String> getFeedback(Map<String, String> data,String treeId);
}
